package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.AttrRespVo;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.atguigu.gulimall.product.vo.ReqAttrGroupRelationVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author mango
 * @email mango@gmail.com
 * @date 2024-04-03 16:24:03
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attrVo);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attrVo);
    /**
     * 获取指定分组关联的所有属性
     */
    List<AttrEntity> getAttrRelation(Long attrgroupId);

    void deleteRelation(List<ReqAttrGroupRelationVo> attrGroupRelationVos);

    PageUtils listNoAttrRelation(Map<String, Object> params, Long attrgroupId);

    /**
     * 查看当前sku所有可以被检索的规格属性
     */
    List<Long> selectSearchAttrIds(List<Long> attrIds);
}

